# -*- coding: UTF-8 -*-
import pytest
from Day72.example import plus

test_data = [{"num1":3,
              "num2":5,
              "except":8,
             },
             {
               "num1":7,
               "num2":8,
               "except":15,
             }
    ]
def pytest_generate_tests(metafunc):
    if 'parameters' in metafunc.fixturenames:
        metafunc.parametrize('parameters',test_data,scope='function')

def test_sum(parameters):
    assert plus(parameters['num1'],parameters['num2']) == parameters['except']

if __name__ == '__main__':
    pytest.main(['-s','yangsy.py'])
